<?php
//------------------------------------------------------
// page modification d'une fiche
//------------------------------------------------------

include ("../cgi-bin/global.inc.php");
include ("fonctions.php");

if (isset($HTTP_POST_VARS['table_posteid'])) {
	$table_posteid=$HTTP_POST_VARS['table_posteid'];
}
if (isset($HTTP_POST_VARS['poste'])) {
	$poste=$HTTP_POST_VARS['poste'];
}
	if ($HTTP_POST_VARS['bouton_ok'])
		{
		print_r($table_posteid);
		}
		else
		{
		$table_posteid["3"]="1";
		$table_posteid["4"]="2";
		$table_posteid["6"]="3";
		}

?>
<html>
<head>
<title><?=$company?> - RD0302 modification d'une fiche risque</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="scripts.js"></SCRIPT>
</head>
<table width="750" border="0" cellspacing="0" cellpadding="0">
<form name="formulaire" action="" method="post" enctype="multipart/form-data">
<tr>
<td>
<?php include "includes/logo_ecran_haut.php"; ?>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td align="left" class="texte11Gris">Gestion des documents uniques</td>
<td align="right">
<a href="javascript:ouvrirAide('RD0302');"><img src="images/aide.gif" border="0" alt="aide"></a>&nbsp;
<a href="login.php"><img src="images/deconnexion.gif" border="0" alt="sortie"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr><td>
      <img src="images/dfleche_rouge.gif" width="8" height="7"><span class="titreArticle"> Modification d'une fiche</span> <span class="texte10Gris">(* zone obligatoire)</span></td></tr>
  <tr><td align="center">
      	<table width="700" border="0" cellspacing="1" cellpadding="1" >
      	<tr><td align="center">
        	<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#OOOOOO">
        	<tr bgcolor="#FFFFFF">
		<td class="texte10">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#OOOOOO">
<?php
	foreach($table_posteid as $cle=>$valeur)				
		{
		echo '<tr bgcolor="#FFFFFF">';
		if ($valeur=="X") $checked="checked"; else $checked="";
		echo '<td class="texte10"><input type="hidden" name="table_posteid['.$cle.']" value="'.$valeur.'"><input type="checkbox" name="poste['.$cle.']" '.$checked.'>'.$cle.'</td>';
		echo '</tr>';
		}
?>		
		</table>
		</td>
		</tr>
 		</table>
	</td></tr>
	<tr><td align="center">
	<input type="submit" name="bouton_ok" value="Valider" class="bouton">&nbsp;
	</td></tr>
	</table>
</td></tr>
</table>
</td></tr>
</form>
</table>
</body>
</html>